/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-04-10
 * Time:16:02
 */
public class Person2 {
    public int data=10;
    private  int data2=20;

    //静态内部类
    static class InnerClass{
        public int data = 40;

        //public static int data3=60； 无法定义静态成员变量
        public void textInner(){
            System.out.println("textInner");
            System.out.println(data);   //输出内部类的40
            Person2 kk=new Person2();
            System.out.println(kk.data); //输出外部类的10；
        }
    }
    public static void main(String[] args) {
        //实例化静态内部类
        Person2.InnerClass fw1 =new Person2.InnerClass() ;
        fw1.textInner();    //输出结果为：textInner
    }
}
